Integrand size = 36, antiderivative size = 215 \[ \int \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n (A+B \tan (c+d x)) \, dx=\frac {2 B \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d (1+2 n)}-\frac {2 (i A+B) \operatorname {AppellF1}\left (\frac {1}{2},1-n,1,\frac {3}{2},-i \tan (c+d x),i \tan (c+d x)\right ) (1+i \tan (c+d x))^{-n} \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d}+\frac {2 (2 B n+i A (1+2 n)) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},1-n,\frac {3}{2},-i \tan (c+d x)\right ) (1+i \tan (c+d x))^{-n} \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d (1+2 n)} \]
2*B*tan(d*x+c)^(1/2)*(a+I*a*tan(d*x+c))^n/d/(1+2*n)-2*(I*A+B)*AppellF1(1/2 ,1-n,1,3/2,-I*tan(d*x+c),I*tan(d*x+c))*tan(d*x+c)^(1/2)*(a+I*a*tan(d*x+c)) ^n/d/((1+I*tan(d*x+c))^n)+2*(2*B*n+I*A*(1+2*n))*hypergeom([1/2, 1-n],[3/2] ,-I*tan(d*x+c))*tan(d*x+c)^(1/2)*(a+I*a*tan(d*x+c))^n/d/(1+2*n)/((1+I*tan( d*x+c))^n)
\[ \int \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n (A+B \tan (c+d x)) \, dx=\int \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n (A+B \tan (c+d x)) \, dx \]
Time = 0.99 (sec) , antiderivative size = 247, normalized size of antiderivative = 1.15, number of steps used = 17, number of rules used = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.444, Rules used = {3042, 4080, 27, 3042, 4084, 3042, 4047, 25, 27, 148, 27, 334, 333, 4082, 76, 74}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n (A+B \tan (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n (A+B \tan (c+d x))dx\) |
\(\Big \downarrow \) 4080 |
\(\displaystyle \frac {2 \int -\frac {(i \tan (c+d x) a+a)^n (a B-a (2 n A+A-2 i B n) \tan (c+d x))}{2 \sqrt {\tan (c+d x)}}dx}{a (2 n+1)}+\frac {2 B \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d (2 n+1)}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {2 B \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d (2 n+1)}-\frac {\int \frac {(i \tan (c+d x) a+a)^n (a B-a (2 n A+A-2 i B n) \tan (c+d x))}{\sqrt {\tan (c+d x)}}dx}{a (2 n+1)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {2 B \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d (2 n+1)}-\frac {\int \frac {(i \tan (c+d x) a+a)^n (a B-a (2 n A+A-2 i B n) \tan (c+d x))}{\sqrt {\tan (c+d x)}}dx}{a (2 n+1)}\) |
\(\Big \downarrow \) 4084 |
\(\displaystyle \frac {2 B \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d (2 n+1)}-\frac {a (2 n+1) (B+i A) \int \frac {(i \tan (c+d x) a+a)^n}{\sqrt {\tan (c+d x)}}dx-(2 B n+i A (2 n+1)) \int \frac {(a-i a \tan (c+d x)) (i \tan (c+d x) a+a)^n}{\sqrt {\tan (c+d x)}}dx}{a (2 n+1)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {2 B \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d (2 n+1)}-\frac {a (2 n+1) (B+i A) \int \frac {(i \tan (c+d x) a+a)^n}{\sqrt {\tan (c+d x)}}dx-(2 B n+i A (2 n+1)) \int \frac {(a-i a \tan (c+d x)) (i \tan (c+d x) a+a)^n}{\sqrt {\tan (c+d x)}}dx}{a (2 n+1)}\) |
\(\Big \downarrow \) 4047 |
\(\displaystyle \frac {2 B \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d (2 n+1)}-\frac {\frac {i a^3 (2 n+1) (B+i A) \int -\frac {(i \tan (c+d x) a+a)^{n-1}}{a \sqrt {\tan (c+d x)} (a-i a \tan (c+d x))}d(i a \tan (c+d x))}{d}-(2 B n+i A (2 n+1)) \int \frac {(a-i a \tan (c+d x)) (i \tan (c+d x) a+a)^n}{\sqrt {\tan (c+d x)}}dx}{a (2 n+1)}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {2 B \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d (2 n+1)}-\frac {-\frac {i a^3 (2 n+1) (B+i A) \int \frac {(i \tan (c+d x) a+a)^{n-1}}{a \sqrt {\tan (c+d x)} (a-i a \tan (c+d x))}d(i a \tan (c+d x))}{d}-(2 B n+i A (2 n+1)) \int \frac {(a-i a \tan (c+d x)) (i \tan (c+d x) a+a)^n}{\sqrt {\tan (c+d x)}}dx}{a (2 n+1)}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {2 B \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d (2 n+1)}-\frac {-\frac {i a^2 (2 n+1) (B+i A) \int \frac {(i \tan (c+d x) a+a)^{n-1}}{\sqrt {\tan (c+d x)} (a-i a \tan (c+d x))}d(i a \tan (c+d x))}{d}-(2 B n+i A (2 n+1)) \int \frac {(a-i a \tan (c+d x)) (i \tan (c+d x) a+a)^n}{\sqrt {\tan (c+d x)}}dx}{a (2 n+1)}\) |
\(\Big \downarrow \) 148 |
\(\displaystyle \frac {2 B \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d (2 n+1)}-\frac {\frac {2 a^3 (2 n+1) (B+i A) \int \frac {\left (a-i a^3 \tan ^2(c+d x)\right )^{n-1}}{a \left (i a^2 \tan ^2(c+d x)+1\right )}d\sqrt {\tan (c+d x)}}{d}-(2 B n+i A (2 n+1)) \int \frac {(a-i a \tan (c+d x)) (i \tan (c+d x) a+a)^n}{\sqrt {\tan (c+d x)}}dx}{a (2 n+1)}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {2 B \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d (2 n+1)}-\frac {\frac {2 a^2 (2 n+1) (B+i A) \int \frac {\left (a-i a^3 \tan ^2(c+d x)\right )^{n-1}}{i a^2 \tan ^2(c+d x)+1}d\sqrt {\tan (c+d x)}}{d}-(2 B n+i A (2 n+1)) \int \frac {(a-i a \tan (c+d x)) (i \tan (c+d x) a+a)^n}{\sqrt {\tan (c+d x)}}dx}{a (2 n+1)}\) |
\(\Big \downarrow \) 334 |
\(\displaystyle \frac {2 B \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d (2 n+1)}-\frac {\frac {2 a (2 n+1) (B+i A) \left (1-i a^2 \tan ^2(c+d x)\right )^{-n} \left (a-i a^3 \tan ^2(c+d x)\right )^n \int \frac {\left (1-i a^2 \tan ^2(c+d x)\right )^{n-1}}{i a^2 \tan ^2(c+d x)+1}d\sqrt {\tan (c+d x)}}{d}-(2 B n+i A (2 n+1)) \int \frac {(a-i a \tan (c+d x)) (i \tan (c+d x) a+a)^n}{\sqrt {\tan (c+d x)}}dx}{a (2 n+1)}\) |
\(\Big \downarrow \) 333 |
\(\displaystyle \frac {2 B \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d (2 n+1)}-\frac {\frac {2 i a^2 (2 n+1) (B+i A) \tan (c+d x) \left (1-i a^2 \tan ^2(c+d x)\right )^{-n} \left (a-i a^3 \tan ^2(c+d x)\right )^n \operatorname {AppellF1}\left (\frac {1}{2},1,1-n,\frac {3}{2},-i a^2 \tan ^2(c+d x),i a^2 \tan ^2(c+d x)\right )}{d}-(2 B n+i A (2 n+1)) \int \frac {(a-i a \tan (c+d x)) (i \tan (c+d x) a+a)^n}{\sqrt {\tan (c+d x)}}dx}{a (2 n+1)}\) |
\(\Big \downarrow \) 4082 |
\(\displaystyle \frac {2 B \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d (2 n+1)}-\frac {\frac {2 i a^2 (2 n+1) (B+i A) \tan (c+d x) \left (1-i a^2 \tan ^2(c+d x)\right )^{-n} \left (a-i a^3 \tan ^2(c+d x)\right )^n \operatorname {AppellF1}\left (\frac {1}{2},1,1-n,\frac {3}{2},-i a^2 \tan ^2(c+d x),i a^2 \tan ^2(c+d x)\right )}{d}-\frac {a^2 (2 B n+i A (2 n+1)) \int \frac {(i \tan (c+d x) a+a)^{n-1}}{\sqrt {\tan (c+d x)}}d\tan (c+d x)}{d}}{a (2 n+1)}\) |
\(\Big \downarrow \) 76 |
\(\displaystyle \frac {2 B \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d (2 n+1)}-\frac {\frac {2 i a^2 (2 n+1) (B+i A) \tan (c+d x) \left (1-i a^2 \tan ^2(c+d x)\right )^{-n} \left (a-i a^3 \tan ^2(c+d x)\right )^n \operatorname {AppellF1}\left (\frac {1}{2},1,1-n,\frac {3}{2},-i a^2 \tan ^2(c+d x),i a^2 \tan ^2(c+d x)\right )}{d}-\frac {a (2 B n+i A (2 n+1)) (1+i \tan (c+d x))^{-n} (a+i a \tan (c+d x))^n \int \frac {(i \tan (c+d x)+1)^{n-1}}{\sqrt {\tan (c+d x)}}d\tan (c+d x)}{d}}{a (2 n+1)}\) |
\(\Big \downarrow \) 74 |
\(\displaystyle \frac {2 B \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d (2 n+1)}-\frac {\frac {2 i a^2 (2 n+1) (B+i A) \tan (c+d x) \left (1-i a^2 \tan ^2(c+d x)\right )^{-n} \left (a-i a^3 \tan ^2(c+d x)\right )^n \operatorname {AppellF1}\left (\frac {1}{2},1,1-n,\frac {3}{2},-i a^2 \tan ^2(c+d x),i a^2 \tan ^2(c+d x)\right )}{d}-\frac {2 a (2 B n+i A (2 n+1)) \sqrt {\tan (c+d x)} (1+i \tan (c+d x))^{-n} (a+i a \tan (c+d x))^n \operatorname {Hypergeometric2F1}\left (\frac {1}{2},1-n,\frac {3}{2},-i \tan (c+d x)\right )}{d}}{a (2 n+1)}\) |
(2*B*Sqrt[Tan[c + d*x]]*(a + I*a*Tan[c + d*x])^n)/(d*(1 + 2*n)) - ((-2*a*( 2*B*n + I*A*(1 + 2*n))*Hypergeometric2F1[1/2, 1 - n, 3/2, (-I)*Tan[c + d*x ]]*Sqrt[Tan[c + d*x]]*(a + I*a*Tan[c + d*x])^n)/(d*(1 + I*Tan[c + d*x])^n) + ((2*I)*a^2*(I*A + B)*(1 + 2*n)*AppellF1[1/2, 1, 1 - n, 3/2, (-I)*a^2*Ta n[c + d*x]^2, I*a^2*Tan[c + d*x]^2]*Tan[c + d*x]*(a - I*a^3*Tan[c + d*x]^2 )^n)/(d*(1 - I*a^2*Tan[c + d*x]^2)^n))/(a*(1 + 2*n))
3.3.28.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[c^n*((b*x )^(m + 1)/(b*(m + 1)))*Hypergeometric2F1[-n, m + 1, m + 2, (-d)*(x/c)], x] /; FreeQ[{b, c, d, m, n}, x] && !IntegerQ[m] && (IntegerQ[n] || (GtQ[c, 0] && !(EqQ[n, -2^(-1)] && EqQ[c^2 - d^2, 0] && GtQ[-d/(b*c), 0])))
Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[c^IntPart [n]*((c + d*x)^FracPart[n]/(1 + d*(x/c))^FracPart[n]) Int[(b*x)^m*(1 + d* (x/c))^n, x], x] /; FreeQ[{b, c, d, m, n}, x] && !IntegerQ[m] && !Integer Q[n] && !GtQ[c, 0] && !GtQ[-d/(b*c), 0] && ((RationalQ[m] && !(EqQ[n, -2 ^(-1)] && EqQ[c^2 - d^2, 0])) || !RationalQ[n])
Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_.)*((e_) + (f_.)*(x_))^(p_.), x_] :> With[{k = Denominator[m]}, Simp[k/b Subst[Int[x^(k*(m + 1) - 1)*(c + d*(x^k/b))^n*(e + f*(x^k/b))^p, x], x, (b*x)^(1/k)], x]] /; FreeQ[{b, c, d, e, f, n, p}, x] && FractionQ[m] && IntegerQ[p]
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Sim p[a^p*c^q*x*AppellF1[1/2, -p, -q, 3/2, (-b)*(x^2/a), (-d)*(x^2/c)], x] /; F reeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && (IntegerQ[p] || GtQ[a, 0]) && (IntegerQ[q] || GtQ[c, 0])
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Sim p[a^IntPart[p]*((a + b*x^2)^FracPart[p]/(1 + b*(x^2/a))^FracPart[p]) Int[ (1 + b*(x^2/a))^p*(c + d*x^2)^q, x], x] /; FreeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && !(IntegerQ[p] || GtQ[a, 0])
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[a*(b/f) Subst[Int[(a + x)^(m - 1)*(( c + (d/b)*x)^n/(b^2 + a*x)), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[c^2 + d ^2, 0]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[B*(a + b*Tan[e + f*x])^m*((c + d*Tan[e + f*x])^n/(f*(m + n))), x] + Simp[ 1/(a*(m + n)) Int[(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^(n - 1)*Sim p[a*A*c*(m + n) - B*(b*c*m + a*d*n) + (a*A*d*(m + n) - B*(b*d*m - a*c*n))*T an[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && GtQ[n, 0]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[b*(B/f) Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^n, x], x, Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[ a^2 + b^2, 0] && EqQ[A*b + a*B, 0]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[(A*b + a*B)/b Int[(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^n, x], x] - Simp[B/b Int[(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^n*(a - b*Tan[ e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[A*b + a*B, 0]
\[\int \left (\sqrt {\tan }\left (d x +c \right )\right ) \left (a +i a \tan \left (d x +c \right )\right )^{n} \left (A +B \tan \left (d x +c \right )\right )d x\]
\[ \int \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n (A+B \tan (c+d x)) \, dx=\int { {\left (B \tan \left (d x + c\right ) + A\right )} {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{n} \sqrt {\tan \left (d x + c\right )} \,d x } \]
integral(((A - I*B)*e^(2*I*d*x + 2*I*c) + A + I*B)*(2*a*e^(2*I*d*x + 2*I*c )/(e^(2*I*d*x + 2*I*c) + 1))^n*sqrt((-I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d *x + 2*I*c) + 1))/(e^(2*I*d*x + 2*I*c) + 1), x)
\[ \int \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n (A+B \tan (c+d x)) \, dx=\int \left (i a \left (\tan {\left (c + d x \right )} - i\right )\right )^{n} \left (A + B \tan {\left (c + d x \right )}\right ) \sqrt {\tan {\left (c + d x \right )}}\, dx \]
\[ \int \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n (A+B \tan (c+d x)) \, dx=\int { {\left (B \tan \left (d x + c\right ) + A\right )} {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{n} \sqrt {\tan \left (d x + c\right )} \,d x } \]
\[ \int \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n (A+B \tan (c+d x)) \, dx=\int { {\left (B \tan \left (d x + c\right ) + A\right )} {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{n} \sqrt {\tan \left (d x + c\right )} \,d x } \]
Timed out. \[ \int \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n (A+B \tan (c+d x)) \, dx=\int \sqrt {\mathrm {tan}\left (c+d\,x\right )}\,\left (A+B\,\mathrm {tan}\left (c+d\,x\right )\right )\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^n \,d x \]